#include "initializer.h"


using namespace std;

int main(int argc, char** argv) {

    string database_path("/shared_folder/data/colmap-pcd/backpack/2024-07-09_14-23-22/database.db");
    string idx_path("/shared_folder/data/colmap-pcd/backpack/2024-07-09_14-23-22/nodes_total.idx");
    string image_dir("/shared_folder/data/colmap-pcd/backpack/2024-07-09_14-23-22/camera/");
    string calib_path("/shared_folder/data/colmap-pcd/backpack/2024-07-09_14-23-22/calib_file.yaml");
    string pointcloud_path("/shared_folder/data/colmap-pcd/backpack/2024-07-09_14-23-22/cloud.ply");
    
    // createDatabaseFromProject(idx_path, calib_path, database_path);
    // extractFeatures(image_dir, database_path);
    // double radius = 20.0;
    // double theta = M_PI_2;
    // matchFeatures(database_path, radius, theta);

    // colmap::image_t image_id1 = 1, image_id2 = 2;
    // colmap::FeatureMatches matches;
    // std::vector<Eigen::Vector3d> points3d;
    // matchFeaturesPointcloud(database_path, pointcloud_path, image_id1, image_id2, 10,
    //     matches, points3d);


    colmap::Reconstruction model;
    model.Read("/shared_folder/data/colmap-pcd/backpack/2024-07-09_14-23-22/model-pcd");
    std::string output_idx_path("nodes_total.idx");
    saveToIdx(model, output_idx_path);

    
    printf("%s: %d\n", __FUNCTION__, __LINE__);

    return 0;
}
